package matrice;

import jeuDeLaVie.Cellule;

public class Decalage extends Matrice{

	private int x,y;
	private Matrice m;
	
	public Decalage(Matrice m,int x, int y) {
		this.x=x;
		this.y=y;
		this.m=m;
	}

	
	public boolean hasNext() {
		return m.hasNext();
	}

	
	public Poid next() {
		Poid p = m.next();
		return new Poid(new Cellule(p.getCellule().getAbs()+x,p.getCellule().getOrd()+y),1);
	}
}
